import { createApp } from 'vue'
import App from './App.vue'
import Common from "./utils/common"
import router from './router'
import vant from './vant'
import VConsole from 'vconsole'
import wechatAuth from '@/utils/wechatAuth'
// import { createPinia } from 'pinia'
import pinia from '@/store/store'
import control from '@/components/musicControl'
import './index.css'
import './index.css'
import "amfe-flexible";
import './permission.js'
import 'vant/lib/index.css';
import scrollbarDirective from '@/directive/scrollbarDirective'
const { MODE, VITE_APP_WECHAT_APP_ID } = import.meta.env
console.log(MODE, VITE_APP_WECHAT_APP_ID, 'MODE, VITE_APP_BASE_API')
// MODE !== 'prod' && new VConsole()
new VConsole()
let app = createApp(App)
app.component('control', control);

vant(app)
app
.use(scrollbarDirective)
.use(wechatAuth, { appid: VITE_APP_WECHAT_APP_ID })
  .use(Common)
  .use(pinia)
  .use(router)
  .mount('#app')
